import { RouterProvider } from 'react-router-dom'
import { ThemeProvider } from '@/components/ThemeProvider'

import { Suspense } from 'react'
import { routes } from '@/routes'
import Loading from '@/components/Loading'

function App() {
    return (
        <Suspense fallback={<Loading />}>
            <ThemeProvider defaultTheme='light' storageKey='vite-ui-theme'>
                <RouterProvider router={routes} />
            </ThemeProvider>
        </Suspense>
    )
}

export default App
